<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * pelamarfoto.php
 * @author ranuandra
 *
 * 5 Jul 2012 10:07:27
 *
 * 
 */

class Model_Pelamarfoto extends ORM
{
	protected $_belongs_to = array(
						'mstpelamar' => array('model'  =>  'mstpelamar')
	);
	
	
	private $_field = array('filename', 'created');
	private $_form = array('filename' => '', 'created'=>'');
	
	public $rules = array(
					'filename' => array(
									array('min_length', array(':value', 0)),
								),
					'created' => array(
									array('min_length', array(':value', 0)),
								),

	);
	
	public function getField()
	{
		return $this->_field;
	}
	
	public function getForm()
	{
		return $this->_form;
		
	}
	
	public function create_data($values)
	{
	    return $this->values($values, $this->_field)->create();
	}	
}